package com.lznAdmin.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.assertj.core.util.Lists;

import java.io.Serializable;
import java.util.List;

/**
 * @program: lznAdmin-pro
 * @description:
 * @Author: lzn
 * @create: 2022-01-19 16:32
 **/
@Data
@TableName(value = "sys_user_role")
public class SysUserRole implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private Long userId;

    private Long roleId;

    /**
     * 拥有的用户id集合
     */
    @TableField(exist = false)
    private List<Long> UserIdsList = Lists.newArrayList();
}
